<?php
//声明命名空间
namespace Home\Controller;
use \Home\Model\IndexModel;
use \Frame\Libs\BaseController;

//定义最终的首页控制器
final class IndexController Extends BaseController{
    public  function index() {
        //创建模型类对象
        $modelObj= IndexModel::getInstance();
        //获取多行数据
        $arrs=$modelObj->fetchAll();
        //向视图赋值并显示
        $this->smarty->assign("arrs",$arrs);
        $this->smarty->display("index/index.html");
    }
}

?>